/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pacificlms.Verifiable.Database;
//likely to change!!!!!!!!!!!!!!

import pacificlms.Verifiable.TypeEnum;
import pacificlms.Verifiable.VerifiableObject;
import pacificlms.Verifiable.VerifyAnnotation;

/**
 *
 * @author Brian Hume
 */
/*public class CheckOutRule {
    MemberType MemberType;
    ResourceType ResourceType;
    int Duration;
}*/
public class CheckOutRule extends VerifiableObject {
    
    @Override
    public String TableName() {
        return "CheckOutRule";
    }
    
    
    private String RuleID;
    @VerifyAnnotation(ApplicationName="Rule ID", DBName="RuleID",  Type=TypeEnum.REALNUMBER, Length=11, PrimaryKey=true)
    public String RuleID(String value)
    {
        return RuleID = StandardProcess(RuleID, value);
    }
    
    
    private String MemberType;
    @VerifyAnnotation(ApplicationName="Member Type", DBName="MemberType",  Type=TypeEnum.STRING, Length=20)
    public String MemberType(String value)
    {
        return MemberType = StandardProcess(MemberType, value);
    }
    
    private String ResourceType;
    @VerifyAnnotation(ApplicationName="Resource Type", DBName="ResourceType",  Type=TypeEnum.STRING, Length=30)
    public String ResourceType(String value)
    {
        return ResourceType = StandardProcess(ResourceType, value);
    }
    
    private String CheckOutDays;
    @VerifyAnnotation(ApplicationName="Check out Days", DBName="CheckOutDays",  Type=TypeEnum.REALNUMBER, Length=11)
    public String CheckOutDays(String value)
    {
        return CheckOutDays = StandardProcess(CheckOutDays, value);
    }
    
    
    //Do not need to worry about verification since CheckOutRule are not be saved by the program
    @Override
    protected boolean ExtraVerification()
    {
        return true;
    }
    
    
    @Override
    public String toString()
    {
        return MemberType +", "+ ResourceType + "=" + CheckOutDays;
    }
}